home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / boot / czesc_2 / unlha / getfile.man < prev    next >
Text File  |  1992-12-09  |  5KB  |  182 lines

  1.  
  2.  
  3.     GetFile V2.0                User manual                 GetFile V2.0
  4.  
  5.  
  6.     NAME 
  7.         GetFile 
  8.  
  9.     SYNOPSIS 
  10.          GetFile [[DIR=DRAWER] Dir] [[FILE] File] [[TITLE] Titlestring]
  11.                 [[VAR=VARIABLENAME] Variablename] [[PAT=PATTERN]
  12.                 Pattern] [[OK=OKTEXT] OkText] [[CANCEL=CANCELTEXT]
  13.                 CancelText] [[LEFT] LeftEdge] [[TOP] TopEdge] [[WIDTH]
  14.                 Width] [[HEIGHT] Height] [GLOBAL] [NOFILES] [SAVE]
  15.                 [MULTI=MULTISELECT] 
  16.  
  17.     DESCRIPTION 
  18.         NOTE: This program required OS 2.04+ to run! 
  19.  
  20.         GetFile  is  a  little  command  intended  to be used in scripts
  21.         (Shell  or ARexx), where an input from the user in the form of a
  22.         filename  or  a  directory name is needed. The requester used is
  23.         the  OS2.0  standard  requester in ASL. If no file was selected,
  24.         the  WARN flag will be set. GetFile is fully re-entrant, and can
  25.         be   made   resident.   Beware  for  environment  variable  name
  26.         colissions if you use the GLOBAL flag.  
  27.  
  28.         The  requester  will  appear on the screen of the current shell,
  29.         unless  requesters  for that shell have been disabled (there are
  30.         utilities  which  can do this), or it is a background shell with
  31.         no  window,  in  which  case  it  will  appear  on the Workbench
  32.         screen.  
  33.  
  34.     OPTIONS 
  35.         There  are  no  required arguments. The keywords (see below) are
  36.         only  required  if  you do not enter the strings in the ordering
  37.         as  above.  Strings  only  need  to  be  quoted  if they contain
  38.         spaces.  
  39.  
  40.     DIR 
  41.         This  lets  you  specify  the  default  directory.  If  none  is
  42.         specified,   the   current   directory   will   be  the  default
  43.         directory.  
  44.  
  45.     FILE 
  46.         This  lets  you  specify  the  default  filename.  Default is no
  47.         name.  
  48.  
  49.     TITLE 
  50.         This  optional  string  specifies  the  title  in  the requester
  51.         window. It defaults to "Select a file" if none is specified.  
  52.  
  53.     VAR 
  54.         This  string lets you specify in which local variable the result
  55.         will  be stored (with full path specification). The default name
  56.         is  GetFileResult.  If you enter an empty string name (i.e. ""),
  57.         the result will be printed on standard output.  
  58.  
  59.  
  60.                                    Page 1
  61.  
  62.  
  63.     GetFile V2.0                User manual                 GetFile V2.0
  64.  
  65.  
  66.  
  67.     PAT=PATTERN 
  68.         This  string  specifies  the  pattern to use. Only the filenames
  69.         that  matches  the  pattern will be shown. It also implies for a
  70.         pattern   gadget.  Default  pattern  is  "#?"  (i.e.  match  all
  71.         files).  
  72.  
  73.     OK=OKTEXT 
  74.         This  string  specifies  the  string  to  have  in the OK gadget
  75.         (leftmost  gadget in the bottom of the requester). Should be max
  76.         6-7 chars.  
  77.  
  78.     CANCEL=CANCELTEXT 
  79.         This  string  specifies  the string to have in the CANCEL gadget
  80.         (rightmost  gadget  in  the  bottom of the requester). Should be
  81.         max 6-7 chars.  
  82.  
  83.     LEFT 
  84.         This  number  specifies the suggested leftedge for the requester
  85.         window.  
  86.  
  87.     TOP 
  88.         This  number  specifies  the suggested topedge for the requester
  89.         window.  
  90.  
  91.     WIDTH 
  92.         This  number  specifies  the  suggested  width for the requester
  93.         window.  
  94.  
  95.     HEIGHT 
  96.         This  number  specifies  the  suggested height for the requester
  97.         window.  
  98.  
  99.     GLOBAL 
  100.         By   default,   GetFile   will  place  the  answer  in  a  local
  101.         environment  variable.   But  this  has  one drawback: You can't
  102.         access  the result easily from ARexx. If you have set this flag,
  103.         it will be quite easy. Simply peek in the ENV: directory. :) 
  104.  
  105.     NOFILES 
  106.         If  this  keyword  is present, then the user will not be able to
  107.         select  any  files, only directories will be shown. Very nice if
  108.         the   user  should  select  a  destination  directory  for  e.g.
  109.         harddisk installation.  
  110.  
  111.     SAVE 
  112.         If  this  keyword is present, the requester will operate in save
  113.         mode,  which is a bit different. First of all, double-clicking a
  114.         file  will  have  no  effect  (except  from  selecting that file
  115.         ofcourse),  and  if  the  user  enters a directory which doesn't
  116.         exist,  there  will  be  a  requester asking if the directory in
  117.         question  should  be  created. The look of the requester will be
  118.  
  119.  
  120.                                    Page 2
  121.  
  122.  
  123.     GetFile V2.0                User manual                 GetFile V2.0
  124.  
  125.  
  126.         somewhat  different.  This  disables  the  MULTISELECT mode (see
  127.         below).  
  128.  
  129.     MULTI=MULTISELECT 
  130.         If  this  keyword  is  present,  the user will be able to select
  131.         multiple  files  (if  the  SAVE switch is used at the same time,
  132.         this   keyword  does  nothing).  The  returned  string  will  be
  133.         space-separated  filenames  with  full  path specification. If a
  134.         filename  contains  spaces,  it  will be quoted. This keyword is
  135.         mostly  intended  to  be  used  from  ARexx-scripts (since it is
  136.         quite easy to process the result in ARexx).  
  137.  
  138. EXAMPLE 
  139.     GetFile TITLE "Select destination directory" NOFILES 
  140.     Echo "Files will be placed in $GetFileResult"
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.                                    Page 3
  181.  
  182.